package com.bl.student.dao.repository;

import com.bl.student.common.enums.OnlineStatus;
import com.bl.student.dao.model.DetailEntity;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * Created by yujingyi on 2018/2/1.
 */
public interface DetailRepository extends JpaRepository<DetailEntity, String> {
    List<DetailEntity> findByStatus(OnlineStatus status);

    Page<DetailEntity> findAllByOrderByCreateTimeDesc(Pageable pageable);

    void deleteById(String id);
}
